// 统一管理用户相关的接口
import request from "@/utils/request";

import { loginForm,loginResponseData,userInfoResponseData } from "./type";
enum API {
    LOGIN_URL="http://114.115.179.162:8022/prod-api/admin/acl/index/login",
    USERINFO_URL="http://114.115.179.162:8022/prod-api/admin/acl/index/info",
    LOGOUT_URL="http://114.115.179.162:8022/prod-api/admin/acl/index/logout"
}

export const reqLogin = (data:loginForm)=>request.post<any,loginResponseData>(API.LOGIN_URL,data)

export const reqUserInfo = ()=>request.get<any,userInfoResponseData>(API.USERINFO_URL)

export const reqLogout = ()=>request.post<any,any>(API.LOGOUT_URL)